<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="cache-control" content="max-age=0">
    <meta http-equiv="cache-control" content="no-cache">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <title>{$forumname}</title>
    <link rel="stylesheet" href="{:ADDON_PUBLIC_PATH}/css/base.min.1adad4a1.css">
    <link rel="stylesheet" href="{:ADDON_PUBLIC_PATH}/css/barindex.min.e299d7fe.css">
    <link rel="stylesheet" type="text/css" href="{:ADDON_PUBLIC_PATH}/css/dialog.css"></link>
    <script src="{:ADDON_PUBLIC_PATH}/js/jquery_min.js"></script>
    <script src="{:ADDON_PUBLIC_PATH}/js/main.js"></script>
    <script src="{:ADDON_PUBLIC_PATH}/js/dialog_min.js"></script>
    <script src="__STATIC__/layerm/layer.m.js"></script>
    <script>
        function collectTrends(tid, uid) {
            loading(true);
            $.post("{:U('likeAjax',array('token'=>get_token()))}", {
                "tid": tid,
                "uid": uid,
            }, function (res) {
                loading(false);
                if (res) {
                    location.reload();
                }
            });
        }
        function praiseTrends(tid, uid) {
            loading(true);
            $.post("{:U('favourAjax',array('token'=>get_token()))}", {
                "tid": tid,
                "uid": uid,
            }, function (res) {
                loading(false);
                if (res) {
                    location.reload();
                }

            });
        }
        function link(url){
            if(url){
                window.location = url;
            }
        }
    </script>
</head>
<body class="wraper indexpage indexpage1 android" id="js_bar_main" style="overflow-y: scroll;">
<div id="js_bar_wraper">
    <div class="header-cover" id="js_bar_basic">
        <div class="header-cover-img" style="background-image: url({$bgurl|get_cover_url});"></div>
        <div class="header">
            <div class="cover mask-gray"></div>
            <div class="info" id="js_bar_info">
                <div class="logo-container">
                    <img class="logo" src="{:get_cover_url($logo)}?empty" onerror="this.src='{:ADDON_PUBLIC_PATH}/images/logo.png';">
                </div>
                <div class="name-info">
                    <div class="labels"><span class="name">{$forumname}</span></div>
                    <div class="info-num" id="js_bar_info_num">
                        <label>帖子 </label>
                        <span id="js_bar_pids_count" num="2">{$count}</span>
                        <label>关注 </label>
                        <span id="js_bar_vote_count" num="3">{$pv}</span>
                    </div>
                    <div class="bar-info-text">{$forminfo}</div>
                </div>
            </div>
        </div>
    </div>
    <div id="uiTestNavWrap" class="ui-test-nav-wrap" style="display: block;">
        <div id="uiTestNav" class="ui-test-nav nohighlight">
            <div class="new-tab-list">
                <div><a id="tab_best" href="{:U('best',array('wecha_id'=>$_GET['wecha_id'],'token'=>$_GET['token']))}" data-tab="tribe" class="">精华</a></div>
                <div><a id="tab_hof" href="{:U('hof',array('wecha_id'=>$_GET['wecha_id'],'token'=>$_GET['token']))}" data-tab="hof" data-cls="2" class="">名人堂</a></div>
                <div><a id="tab_qun" class="tab_qun" href="javascript:void(0)" data-tab="qun">相关群</a></div>
                <div><a id="tab_album" href="{:U('album',array('wecha_id'=>$_GET['wecha_id'],'token'=>$_GET['token']))}" data-tab="hof" data-cls="2" class="">相册</a></div>
            </div>
            <!--<div class="new-tab-list">-->
                <!--<div><a id="tab_best" href="{:addons_url('WeiSite://WeiSite/index',array('token'=>get_token()))}" data-tab="tribe" class="iconfont">微官网</a></div>-->
                <!--<div><a id="tab_hof" href="{:U('myContent',array('wecha_id'=>$_GET['wecha_id'],'token'=>$_GET['token']))}" data-tab="hof" data-cls="2" class="">我的帖子</a></div>-->
                <!--<div><a id="tab_my" href="{:addons_url('UserCenter://UserCenter/userCenter',array('token'=>get_token()))}" data-tab="hof" data-cls="2" class="iconfont">个人中心</a></div>-->
            <!--</div>-->
            <style type="text/css"></style>
        </div>
    </div>
    <ul class="item list" id="js_bar_list">
        <volist id="list" name="list">
        <li onclick="link('{:U('comment',array('tid'=>$list['id'],'wecha_id'=>get_mid(),'token'=>$list['token']))}')" class="section-1px " type="0" mock="">
            <div class="detail-text-content nopic">
                <if condition="$list['photoArr'] neq ''">
                    <div class="act-img img-gallary  hide-bg">
                        <for start="0" end="count($list['photoArr'])">
                            <img src="{$list['photoArr'][$i]|get_cover_url}" width="100%">
                        </for>
                        <div class="pic-count-tips"> {$list.photoArr|count}图 </div>
                    </div>
                </if>
                <div class="text-container">
                    <h3 class="text">
                        <div id="post_tags_-csNHQ8-1444267513" class="post-tags">
                            <eq name="list.class" value="2">
                                <label class="best">精</label>
                            </eq>
                            <egt name="list.createtime" value="$showLastTime">
                            <label class="new">新</label>
                            </egt>
                        </div>
                        {$list.title}
                    </h3>
                    <div class="list-content ">{:htmlspecialchars_decode($list['content'],ENT_QUOTES)}</div>
                </div>
                <div class="info noimg">
                    <div>
                        <span class="nick">
                            <span class="single-ellipsis-long"> {$list.uname}  </span>
                            <span class="ver-middle"> </span>
                        </span>
                    </div>
                    <div class="fl-right">
                        <i class="read-icon"></i>
                        <span class="read-num-text">{$list.view|default=1}</span>
                        <i class="reply-icon"></i>
                        <span class="reply-num-text" style="margin-right: 0;">{$list.cnum|default=1}</span>
                    </div>
                </div>
            </div>
        </li>
        </volist>
    </ul>
    <div class="loading" id="js_bar_loading" style="/* opacity: 1; */"></div>
</div>
<div class="publish-btn-container section-1px">
    <div class="publish-btn appbox">
        <i class="publish-btn-icon"></i>
        <a id="tab-publish" href="{:U('add',array('wecha_id'=>get_mid(),'token'=>get_token()))}">发布话题</a>
    </div>
</div>
</body>
<script>
    $(document).ready(function () {

        var range = 50;             //距下边界长度/单位px
        var pageNum = 2;
        var totalheight = 0;
        var main = $("#js_bar_list");                //主体元素
        var state = 0;
        var _srollPos = 0;


        $(window).scroll(function () {
            var pageSize = 10;
            var total = 1105;
            if (Math.ceil(total / pageSize) < pageNum) {
                return false;
            }
            var srollPos = $(window).scrollTop();    //滚动条距顶部距离(页面超出窗口的高度)
            if (srollPos < _srollPos) {
                return;
            } else {
                _srollPos = srollPos;
            }
            totalheight = parseFloat($(window).height()) + parseFloat(srollPos);
            if (!state && (($(document).height() - range) <= totalheight)) {
                loading(true);
                state = 1;
                $.get('/index.php?s=/addon/Forum/Index/moreList&', {
                    "token": "{:get_token()}",
                    "wecha_id": "{:get_mid()}",
                    "p": pageNum
                }, function (res) {
                    loading(false);
                    if (res != 0) {
                        main.append(res);
                        pageNum++;
                        state = 0;
                    } else {
                        loading(false);
                        state = 0;
                    }
                });
            }
        });
    });
</script>
</html>